Macro Cfourring[9]

This macro typesets the cyclobutane ring. The ring positions to which R1, R2, R3, and R4 are attached are designated position 1, 2, 3, and 4, respectively.

$\displaystyle \fourring$$R1$$R2$$R3$$R4$$R5$$R6$SSQ   $\displaystyle \fourring$QQQQQQQD$R9$

Arguments 1–6:
An argument of ``Q'' causes no action. All other argument values are used as the respective substituent formulas R1, R2, R3, R4, R5, and R6.
Argument 7:
An argument of ``D'' typesets a second bond between ring positions 1 and 2. No action is taken for any other value of the argument.
Argument 8:
An argument of ``D'' typesets a second bond between ring positions 3 and 4. No action is taken for any other value of the argument.
Argument 9:
An argument of ``Q'' causes no action. All other argument values cause an outside double bond to be drawn from ring position 2, and the argument itself to be put at the end of the double bond as substituent formula R9.